package cn.xuyun.cc.tcp.util;


import org.apache.log4j.Logger;

import com.sun.org.apache.xerces.internal.impl.dv.util.HexBin;

import cn.xuyun.cc.tcp.vo.Entity;

public class LogUtil {

	public static void log(Logger logger,Entity entity)
	{
		
		logger.info("hex:"+HexBin.encode(entity.getBytes()));
		logger.info( "magic:"+entity.getMagic());
		logger.info( "version:"+entity.getVersion());
		logger.info( "data_len:"+entity.getData_len());
		logger.info( "send_time:"+entity.getSend_time());
		logger.info( "serial:"+entity.getSerial());
		logger.info( "type:"+entity.getType());
		logger.info("cmd:"+entity.getCmd());
		logger.info( "content_len:"+entity.getContent_len());
		logger.info( "content:"+new String(entity.getContent()));
		
		
		//504B474D47520000000000010000005150874A87000000000000000100002B670000003D4F4B00000000504B474D47520000000000010000002750874A870000000000000000000007D700000013323031322D31302D32342030313A35353A313900000000
		
		//504B474D4752000000000001000000515087EF3D000000000000000100002B670000003D4F4B00000000504B474D4752000000000001000000275087EF3D0000000000000000000007D700000013323031322D31302D32342032313A33383A3035
	}

}
